/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package multiNyID.Objek;

/**
 * class fpsCounter
 *
 * a class to count the FPS value of the system
 *
 * @author whe_green@yahoo.co.id
 * Analisis Metode Occlusion Based Pada Augmented Reality
 * Studi Kasus Interaksi dengan Objek Virtual Secara Realtime
 * Menggunakan Gerakan Tangan
 *
 * Institut Teknologi Telkom
 * Fakultas Informatika 2007
 * Bandung Indonesia
 *
 * nyargreen.wordpress.com
 */
public class fpsCounter {
    public int currentFPS = 0;
    public int FPS = 0;
    public long start = 0;

    public void tick() {
        currentFPS++;
        if(System.currentTimeMillis() - start >= 1000) {
            FPS = currentFPS;
            currentFPS = 0;
            start = System.currentTimeMillis();
            System.out.println("=============start fps counter================");
        }
        System.out.println("=================NILAI FPS = "+FPS+"================");
    }

    public int getFPS() {
        return FPS;
    }

}
